# coding=utf-8
import os
from django.conf import settings
from django.conf.urls import patterns, include, url
from django.contrib import admin


urlpatterns = patterns('',
    url(r'^$', 'core.views.index', name='index'),
    url(r'^demo/', include('demo.urls', namespace='demo')),
    url(r'^admin/', include(admin.site.urls)),
)

if settings.DEBUG:
    urlpatterns += patterns('',
        url(r'^static/(?P<path>.*)$', 'django.views.static.serve',
            { 'document_root': settings.STATICFILES_DIRS,
        }),
    )
    
else:
    urlpatterns += patterns('',
        url(r'^static/(?P<path>.*)$', 'django.views.static.serve',
            { 'document_root': settings.STATIC_ROOT,
        }),
    )